package com.wxy.entity;

import com.wxy.entity.ValidInterface.group1;
import com.wxy.entity.ValidInterface.group2;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 47868
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "分组校验数据")
public class GroupUser {
    @NotBlank(groups = group1.class,message = "用户名为空")
    @Schema(title = "用户名",example = "zhangsan")
    private String username;
    @Email(groups = group2.class,message = "邮箱格式错误")
    @Schema(title = "邮箱地址",example = "xxx@qq.com")
    private String email;
}
